package com.project.mapper;


import com.project.bean.CutPageBean;
import com.project.bean.UserBean;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface IUserMapper {
    public void add(UserBean userBean);

    public void del(Integer id);

    public void updateGrade(@Param("id") Integer id, @Param("grade") String grade);

    public void updatePwd(@Param("id") Integer id, @Param("passWord") String passWord);

    public UserBean login(@Param("userName") String userName, @Param("passWord") String passWord);

    public UserBean findById(Integer id);

    public CutPageBean<UserBean> findByItem(@Param("userName") String userName,
                                            @Param("startDate") LocalDate startDate,
                                            @Param("endDate") LocalDate endDate);

    public List<UserBean> cutList(@Param("userName") String userName,
                                     @Param("startDate") LocalDate startDate,
                                     @Param("endDate") LocalDate endDate,
                                     @Param("startRow") Integer startRow,
                                     @Param("pageSize") Integer pageSize);

    public int cutCount(@Param("userName") String userName,
                        @Param("startDate") LocalDate startDate,
                        @Param("endDate") LocalDate endDate);
}
